To read a document using an image processing apparatus such as a scanner and store the document as image data, it may be preferable to accurately detect a document region from the read image. In general, a flat-bed scanner identifies a document region and the remaining region from each other using a backing having a monochromatic color such as white or black. However, when, for example, a document bound in book form, a stapled document, or a document too voluminous to feed by an ADF (Auto Document Feeder) is read, the user may read the document while a cover for the scanner is open to shorten the operation time. When the document is read while the cover is open, no backing is used so that illumination etc., may be captured in a region capturing no document in the read image data, thus hindering accurate detection of a document region. In recent years, a technique for preventing detection of an incorrect document region is under development.
An information processing apparatus which detects a rectangle region from an input image is disclosed. The information processing apparatus extracts edge pixels from the input image, extracts straight lines from the extracted edge pixels, and extracts rectangle region candidates formed by each straight line. The information processing apparatus selects a rectangle region from the rectangle region candidates based on the number of edge pixels located within a prescribed distance from each side of each rectangle region candidate, and the likelihood of being a corner of each corner of each rectangle region candidate (see Japanese Laid-open Patent Publication No. 2013-106160).
A scanner which determines a document region in a read image is disclosed. The scanner determines whether any edge line on which edge pixels continuously align themselves is present in an end region between the position of the end side of a read image and that of the end side of a press member, in the read image. When it is determined that such an edge line is present in the end region, the scanner determines the edge line as one side of a document region that is a region of a document image itself. When it is determined that such an edge line is absent in the end region, the scanner determines as one side of a document region, an edge line located at the position of the end side of the press member or the position more to the center of the read image than the position of this end side (see Japanese Laid-open Patent Publication No. 2013-179410).
An image processing apparatus which detects an edge defining a document region from image data obtained by reading a document, suffering from flares, is disclosed. The image processing apparatus detects candidates for edge points defining the boundary line of a document region from image data including the document region in two ways, and determines a candidate located at internal side of the document region as an edge point (see Japanese Laid-open Patent Publication No. 2013-58937).
A scanner which determines a document region in a read image is disclosed. The scanner detects from a read image, an edge line on which edge pixels align themselves in the direction in which the angular difference from the boundary line between a platen glass and an underframe is equal to or larger than a prescribed value. When an endpoint for the edge line is located on the boundary line, the scanner determines the end point of the edge line as a point on one side of the document region; otherwise, it determines an endpoint for an edge line closest to the boundary line as a point on one side of the document region (see Japanese Laid-open Patent Publication No. 2013-179409).